@extends('backend.layouts.app')
@section('content')
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-toolbar clearfix">
                    <form class="pull-right search-bar" method="get" action="{{url($baseRoute.$module_id)}}">
                        <div class="input-group">
                            <input type="text" class="form-control" value="{{request('keyword','')}}" name="keyword"
                                   placeholder="名称/方法">
                            <span class="input-group-btn">
                                <button class="btn btn-primary" type="submit">
                                    <i class="mdi  mdi-magnify"></i>
                                    搜索</button>
                            </span>
                        </div>
                    </form>
                    <div class="toolbar-btn-action">
                        @b('create')
                        <a class="btn btn-primary m-r-5"
                           href='javascript:systemUtil.popUrl("新增","{{url($baseRoute.'create/'.$module_id)}}","400px","250px");'><i
                                class="mdi mdi-plus"></i> 新增</a>
                        @endb
                    </div>
                </div>
                <div class="card-body">

                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th width="30">
                                    <label class="lyear-checkbox checkbox-primary">
                                        <input type="checkbox" id="check-all"><span></span>
                                    </label>
                                </th>
                                <th>ID</th>
                                <th>名称</th>
                                <th>控制器</th>
                                <th>方法</th>
                                <th width="80">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach ($page as $item)
                                <tr>
                                    <td>
                                        <label class="lyear-checkbox checkbox-primary">
                                            <input type="checkbox" name="ids[]" value="{{$item->id}}"><span></span>
                                        </label>
                                    </td>
                                    <td>{{$item->id}}</td>
                                    <td>{{$item->name}}</td>
                                    <td>{{$item->controller}}</td>
                                    <td>{{$item->action}}</td>

                                    <td>
                                        <div class="btn-group">
                                            @b('edit')
                                            <a class="btn btn-xs btn-default"
                                               href='javascript:systemUtil.popUrl("编辑","{{url($baseRoute.'edit/'.$item['id'])}}","400px", "200px");'
                                               title="编辑"
                                               data-toggle="tooltip"><i
                                                    class="mdi mdi-pencil"></i></a>
                                            @endb
                                            @b('destroy')
                                            <a class="btn btn-xs btn-default"
                                               href='javascript:systemUtil.confirmDel("{{url($baseRoute.'destroy/'.$item['id'])}}")'
                                               title="删除"
                                               data-toggle="tooltip"><i
                                                    class="mdi mdi-delete"></i></a>
                                            @endb
                                        </div>
                                    </td>
                                </tr>
                            @endforeach
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
@stop
